package com.xjd.transport;

import java.io.IOException;
import java.io.InputStream;
import java.net.InetSocketAddress;

public interface Channel {

	InetSocketAddress getLocalAddress();
	
	InetSocketAddress getRemoteAddress();
	
	void send(InputStream src) throws TransportException;
	
	Future asyncSend(InputStream src);
	
	InputStream receive() throws TransportException;
	
	Future asyncReceive(ReceiveHandler handler);
	
	void close();
}
